package xinxin.com.StrategyPattern.Events;

import xinxin.com.StrategyPattern.CashContext.CashContext;

public class CalculateEvents {
    static public double calculate(String price, String number, String favourable) {
        CashContext cashContext = new CashContext(favourable);
        double totalPrice = Double.parseDouble(price) * Integer.parseInt(number);
        return cashContext.GetResult(totalPrice);
    }
}
